package SellCar.dao.buy.impl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.ibatis.session.SqlSession;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import SellCar.dao.buy.BuyMapper;
import SellCar.pojo.Buy;
import SellCar.utils.MyBatisUtil;
@Repository("buyMapperImpl")
public class BuyMapperImpl implements BuyMapper{
	@Autowired
	@Qualifier("sqlSessionTemplate")
	private SqlSessionTemplate sqlSessionTemplate;
	public SqlSessionTemplate getSqlSessionTemplate() {
		return sqlSessionTemplate;
	}
	public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
		this.sqlSessionTemplate = sqlSessionTemplate;
	}

	
	
	public List<Buy> getBuyList() {
		return sqlSessionTemplate.getMapper(BuyMapper.class).getBuyList();
	}

	public List<Buy> getCarInfo(String CarName) {
		return sqlSessionTemplate.getMapper(BuyMapper.class).getCarInfo(CarName);
	}
	
}
